﻿using System;

namespace BikeBouncer.BusinessLayer
{
	public class DataParser
	{
		#region Main parsers

		public static String ParseKeywords(String keywords)
		{
			if (String.IsNullOrEmpty(keywords))
			{
				return String.Empty;
			}

			keywords = keywords.Replace(" ", ",");
			keywords = keywords.Replace(";", ",");
			keywords = keywords.Replace("|", ",");

			while (keywords.Contains(",,"))
			{
				keywords = keywords.Replace(",,", ",");
			}

			return keywords;
		}

		#endregion
	}
}
